package com.shizi.iship.dao.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.shizi.iship.dao.entity.VmModbusPointCollectRule;
import com.shizi.iship.dao.mapper.VmModbusPointCollectRuleMapper;
import com.shizi.iship.dao.service.IVmModbusPointCollectRuleService;
import net.oschina.renyong.query.generator.QueryParam;

/**
 * <p>
 * modbus采集点采集规则查询 服务实现类
 * </p>
 * @author idea
 */
@Service
public class VmModbusPointCollectRuleServiceImpl implements IVmModbusPointCollectRuleService {

	@Autowired
	private VmModbusPointCollectRuleMapper mapper;

	@Override
	public List<VmModbusPointCollectRule> selectList(QueryWrapper<VmModbusPointCollectRule> queryWrapper) {
		QueryParam<VmModbusPointCollectRule> queryParam = new QueryParam<>(queryWrapper);
		return mapper.selectList(queryParam);
	}

	@Override
	public Page<VmModbusPointCollectRule> selectPage(Page<VmModbusPointCollectRule> page, QueryWrapper<VmModbusPointCollectRule> queryWrapper) {
		QueryParam<VmModbusPointCollectRule> queryParam = new QueryParam<>(queryWrapper);
		page.setRecords(mapper.selectList(page, queryParam));
		return page;
	}

}
